package com.hb.unic.core.async.impl;

import com.hb.unic.core.async.IMessageChannel;
import com.hb.unic.core.context.Application;

import lombok.Getter;

/**
 * 异步消息配置
 *
 * @since v1.0，2023/8/28 22:54，create by Mr.Huang.
 */
@Getter
public class MessageChannelConfig {

    /**
     * 消息类型
     */
    private String messageType;

    /**
     * 消息处理通道
     */
    private IMessageChannel channel;

    public MessageChannelConfig(String messageType, String channelBeanName) {
        this.messageType = messageType;
        channel = Application.getContext().getBean(channelBeanName, IMessageChannel.class);
    }

}
